package com.mazaiting.face.ui;

import com.mazaiting.face.ui.config.FaceConfig;
import com.mazaiting.face.ui.interfaces.IDetectStrategy;

/***
 *
 *
 *                                                    __----~~~~~~~~~~~------___
 *                                   .  .   ~~//====......          __--~ ~~
 *                   -.            \_|//     |||\\  ~~~~~~::::... /~
 *                ___-==_       _-~o~  \/    |||  \\            _/~~-
 *        __---~~~.==~||\=_    -_--~/_-~|-   |\\   \\        _/~
 *    _-~~     .=~    |  \\-_    '-~7  /-   /  ||    \      /
 *  .~       .~       |   \\ -_    /  /-   /   ||      \   /
 * /  ____  /         |     \\ ~-_/  /|- _/   .||       \ /
 * |~~    ~~|--~~~~--_ \     ~==-/   | \~--===~~        .\
 *          '         ~-|      /|    |-~\~~       __--~~
 *                      |-~~-_/ |    |   ~\_   _-~            /\
 *                           /  \     \__   \/~                \__
 *                       _--~ _/ | .-~~____--~-/                  ~~==.
 *                      ((->/~   '.|||' -_|    ~~-/ ,              . _||
 *                                 -_     ~\      ~~---l__i__i__i--~~_/
 *                                 _-~-__   ~)  \--______________--~~
 *                               //.-~~~-~_--~- |-------~~~~~~~~
 *                                      //.-~~~--\
 *                               神兽保佑
 *                              代码无BUG!
 * @author mazaiting
 * @date 2019-07-10
 * @description 人脸管理者
 */
public class FaceManager {
    /**
     * 脸部配置文件
     */
    private FaceConfig mFaceConfig = new FaceConfig();
    /**
     * 检测策略
     */
    private IDetectStrategy mDetectStrategyModule;

    private static FaceManager sInstance = null;

    private FaceManager() {
    }

    /**
     * 单例
     * @return Face 管理者
     */
    public static FaceManager getInstance() {
        if (null == sInstance) {
            synchronized (FaceManager.class) {
                if (null == sInstance) {
                    sInstance = new FaceManager();
                }
            }
        }
        return sInstance;
    }

    public void setFaceConfig(FaceConfig faceConfig) {
        mFaceConfig = faceConfig;
    }

    public FaceConfig getFaceConfig() {
        return mFaceConfig;
    }

    public IDetectStrategy getDetectStrategyModule() {
        return mDetectStrategyModule;
    }

    public void setDetectStrategyModule(IDetectStrategy detectStrategyModule) {
        mDetectStrategyModule = detectStrategyModule;
    }
}
